///////////////////////////////////////////////////////////////////////////////
//
//	c128.i
//
//	$Id: SortedList.cpp 29 2011-10-02 23:05:56Z lunarship $
//
//	Labels for Commodore 64.
//	Label names mainly come from the Commodore 64 Programmer's Reference Guide.
//
//-----------------------------------------------------------------------------
//
//	Copyright (C) Simon Collis 2000-2011
//
//	This file is part of a6.
//
//	a6 is free software: you can redistribute it and/or modify it under the
//	terms of the GNU General Public License as published by the Free Software
//	Foundation, either version 3 of the License, or (at your option) any later
//	version.
//
//	a6 is distributed in the hope that it will be useful, but WITHOUT ANY
//	WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
//	FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
//	details.
//
//	You should have received a copy of the GNU General Public License
//	along with a6.  If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
//
//	0.5.0   First version
//
//////////////////////////////////////////////////////////////////////////////


		.ifndef _C128_I
		.define _C128_I

//		.cpu    6502
				
//////////////////////////////////////////////////////////////////////////////
//
// *** Colours
//
//	C128 Programmers Reference Guide, 
//
black		= $00
white		= $01
red			= $02
cyan		= $03
purple		= $04
green		= $05
blue		= $06
yellow		= $07
orange		= $08
brown		= $09
ltred		= $0a
darkgrey	= $0b
medgrey		= $0c
ltgreen		= $0d
ltblue		= $0e
ltgrey		= $0f

//////////////////////////////////////////////////////////////////////////////
//
// *** Memory map
//
//      P502 onwards,
//

//
// *** Zero page
//

// Constants for R6510 ($0001) (P260)
loram	= 1
hiram	= 2
charen	= 4

//      P502
d6510	= $0000		// 6510 On-Chip Data-Direction Register
r6510	= $0001		// 6510 On-Chip 8-Bit Input/Output Register
bank	= $0002		// Token 'search' looks for, or bank #
pc_hi	= $0003		// Address for BASIC SYS command or monitor...
pc_lo	= $0004		// Address, status, A-Reg, X-Reg, Y-Reg
s_reg	= $0005		// Status reg temp
a_reg	= $0006		// .A reg temp
x_reg	= $0007		// .X reg temp
y_reg	= $0008		// .Y reg temp
stkptr	= $0009		// Stack pointer temp

// Basic zero page storage
// Anything marked (*) the C128 PRG isn't too clear on whether this is that
// address or not, and the value I've put in is a guess...
integr	= $0009		// (*)
charac	= $0009		// Search acharacter
endchr	= $000a		// Flag: scan for quote at end of string
trmpos	= $000b		// Screen column from last tab
verck	= $000c		// Flag: 0=load, 1=verify
count	= $000d		// Input buf.ptr / # of subscripts
dimflg	= $000e		// Flag: default array dimension
valtyp	= $000f		// Data type: $FF = string, $00 = numeric
intflg	= $0010		// Data type: $00 = float.pt, $80 = integer
garbfl	= $0011		// Flag: data scan / list quote / garbage collection

dores	= $0012		// (*)
subflg	= $0012		// Flag; subscripe ref. / user func. call
inpflg	= $0013		// Flag: $00 = INPUT, $40 = GET, $98 = READ

domask	= $0014		//	(*)
tansgn	= $0014		// Flag: TAN sign / comparison result
channl	= $0015
poker	= $0016
linnum	= $0016		// (*) Temp integer value
temppt	= $0018		// Pointer: temp string stack
lastpt	= $0019		// Last temp string address
tempst	= $001b		// Stack for temp strings
index	= $0024		// Utility pointer area
index1	= $0024		// (*)
index2	= $0026
resho	= $0028		// Float.pt. product of multiply
resmoh	= $0029
addend	= $002a
resmo	= $002a		// (*)
reslo	= $002b
txttab	= $002d		// Pointer: start of BASIC text
vartab	= $002f		// Pointer: start of BASIC variables
arytab	= $0031		// Pointer: start of BASIC arrays
strend	= $0033		// Pointer: end of BASIC arrays + 1
fretop	= $0035		// Pointer: bottom of string storage

		.endif
